// 平台管理-公告
import request from '@/config/request'

// 查看公告列表
export const getNoticeList = (params: number) => {
    return request.get(`/admin/notice/list?type=${params}`)
}

// 新增公告
export const addNotice = (data: any) => {
    return request.post(`/admin/notice/add`, data)
}

// 修改公告
export const updateNotice = (data: any) => {
    return request.post(`/admin/notice/update`, data)
}

// 删除公告
export const deleteNotice = (id: number) => {
    return request.delete(`/admin/notice/del?id=${id}`)
}

// 获取单个公告
export const getNotice = (id: number) => {
    return request.get(`/admin/notice/id?id=${id}`)
}